import { useState } from "react";
import Child from "./Child";

export default function Parent() {
  const [list, setlist] = useState(["html", "css", "js"]);

  return (
    <div>
      <Child setlist={setlist} />
      <div className="bd">
        <ul>
          {[
            <li>
              {list.map((item) => {
                return <li key={item}> {item} </li>;
              })}
            </li>,
          ]}
        </ul>
      </div>
    </div>
  );
}
